✍🏻Каков реальный вариант использования ключевого слова «yield» в C#?
Ключевое слово yield в C# используется в методах итераторов для создания итератора с отслеживанием состояния и возврата последовательности значений «на лету», без сохранения всей последовательности в памяти. Он создает пользовательскую реализацию интерфейса IEnumerator на основе кода метода итератора и запоминает текущее состояние выполнения между вызовами MoveNext(). Такая ленивая оценка итератора улучшает использование памяти и производительность, особенно для больших или бесконечных последовательностей.
✍🏻Каков реальный вариант использования ключевого слова «yield» в C#?
Ключевое слово yield в C# используется в методах итераторов для создания итератора с отслеживанием состояния и возврата последовательности значений «на лету», без сохранения всей последовательности в памяти. Он создает пользовательскую реализацию интерфейса IEnumerator на основе кода метода итератора и запоминает текущее состояние выполнения между вызовами MoveNext(). Такая ленивая оценка итератора улучшает использование памяти и производительность, особенно для больших или бесконечных последовательностей.
Bitcoin is built on a distributed digital record called a blockchain. As the name implies, blockchain is a linked body of data, made up of units called blocks that contain information about each and every transaction, including date and time, total value, buyer and seller, and a unique identifying code for each exchange. Entries are strung together in chronological order, creating a digital chain of blocks. “Once a block is added to the blockchain, it becomes accessible to anyone who wishes to view it, acting as a public ledger of cryptocurrency transactions,” says Stacey Harris, consultant for Pelicoin, a network of cryptocurrency ATMs. Blockchain is decentralized, which means it’s not controlled by any one organization. “It’s like a Google Doc that anyone can work on,” says Buchi Okoro, CEO and co-founder of African cryptocurrency exchange Quidax. “Nobody owns it, but anyone who has a link can contribute to it. And as different people update it, your copy also gets updated.”
Telegram hopes to raise $1bn with a convertible bond private placement
The super secure UAE-based Telegram messenger service, developed by Russian-born software icon Pavel Durov, is looking to raise $1bn through a bond placement to a limited number of investors from Russia, Europe, Asia and the Middle East, the Kommersant daily reported citing unnamed sources on February 18, 2021.The issue reportedly comprises exchange bonds that could be converted into equity in the messaging service that is currently 100% owned by Durov and his brother Nikolai.Kommersant reports that the price of the conversion would be at a 10% discount to a potential IPO should it happen within five years.The minimum bond placement is said to be set at $50mn, but could be lowered to $10mn. Five-year bonds could carry an annual coupon of 7-8%.
Библиотека собеса по C | вопросы с собеседований from ar